#pragma once
#include <BWAPI.h>
#include <math.h>
#include "Vector.h"
using namespace BWAPI;

// Stores data on potential sources.  This is used mainly to allow components using the threat map to include additional potentials without modifying the map
// (For example, a scout may be given an attractive potential to the center of a base and repulsive forces from all enemy units/structures based on vision.
class Potential {
  public:
    static const double epsilon; // Value of potential field used to calculate variable controlling width
    double K; // Magnitude of potential at location of source
    double A; // Controls width of field (or equivalently, rate at which field decays with distance from source)
    Position* p; // Location of potential field
    Potential();
    Potential(double K,double A,Position* pos);
    Vector calcForce(Position* atPos); // Calculates the force vector at the given position generated by this potential
};
